<?php

namespace App\Listeners;

use App\Events\DistributionPosterProductEvent;
use App\Jobs\DistributionPosterProductJob;
use Illuminate\Support\Facades\Log;

class DistributionPosterProductListener
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return void
     */
    public function handle(DistributionPosterProductEvent $event)
    {
        Log::info('触发商品海报生成');
        DistributionPosterProductJob::dispatch($event->city_id, $event->user, $event->productInfo);
    }
}
